package com.neusoft.demo8;

import java.util.Scanner;

public class WrapDemo {
    public void m1(Integer i) { //Integer i = 1;封装
        int a = i + 12; //相当于int a = i.intValue()自动拆封 + 12;
        System.out.println(a);
    }

    public static void main(String[] args) {
        WrapDemo demo = new WrapDemo();
        int x = 1;
        demo.m1(x);
//        Scanner input = new Scanner(System.in);
//        System.out.println("请输入一个数num1");
//        String num1 = input.next();
//        System.out.println("请输入一个数num2");
//        String num2 = input.next();
//        int a = Integer.parseInt(num1); //将字符串转换为int类型
//        int b = Integer.parseInt(num2);
//        System.out.println( a + b);
    }
}
